<%@ page import="java.util.List" %>
<%@ page import="cn.yunhe.vote.entity.Vote" %>

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<%
Vote vote=new Vote(5,"666",6);
request.setAttribute("vote",vote);
%>
${requestScope.vote.}
<c:forEach items="${requestScope.list}" var="v" varStatus="s">

    <c:choose>
        <c:when test="${s.count mod 2 eq 0}">
            <font color="#8a2be2">
                <c:out value="${v.name}"/>&nbsp;&nbsp;
                <div style="width: ${v.times*10}px;height: 20px;background-color: red"></div>
                <br>
            </font>
        </c:when>

        <c:otherwise>
            <c:out value="${v.name}"/>&nbsp;&nbsp;
            <div style="width: ${v.times*10}px;height: 20px;background-color: red"></div>
            <br>
        </c:otherwise>
    </c:choose>

</c:forEach>

</body>
</html>
